#include "stdafx.h"

using namespace sprite;
extern texture* tex;
extern image* img;

void OnKeyDown(HWND hWnd,WPARAM wParam){

	static float size=1;
	static float angle=0;

	switch(wParam){

		case VK_LEFT:

			angle=angle+PI/4;

			img->SetAngle(angle);

			break;

		case VK_RIGHT:

			angle=angle-PI/4;

			img->SetAngle(angle);

			break;

		case VK_DOWN:

			size=size-0.1;

			img->SetSize(size);

			break;

		case VK_UP:

			size=size+0.1;

			img->SetSize(size);

			break;

	}

	InvalidateRect(hWnd,NULL,true);

}